home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / toolkit / riruf1 / rufdbfrm.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-03-23  |  3.1 KB  |  110 lines

  1. VERSION 2.00
  2. Begin Form RUFDBForm 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Database Location"
  6.    ClientHeight    =   1425
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   7365
  10.    Height          =   1830
  11.    KeyPreview      =   -1  'True
  12.    Left            =   1035
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   1425
  17.    ScaleWidth      =   7365
  18.    Top             =   1140
  19.    Width           =   7485
  20.    Begin CommonDialog CMDialog1 
  21.       Left            =   6840
  22.       Top             =   0
  23.    End
  24.    Begin CommandButton cmdSel 
  25.       Caption         =   "Select &Database"
  26.       Height          =   375
  27.       Left            =   840
  28.       TabIndex        =   4
  29.       Top             =   960
  30.       Width           =   1695
  31.    End
  32.    Begin CommandButton cmdCancel 
  33.       Cancel          =   -1  'True
  34.       Caption         =   "&Cancel"
  35.       Height          =   375
  36.       Left            =   4680
  37.       TabIndex        =   3
  38.       Top             =   960
  39.       Width           =   1695
  40.    End
  41.    Begin CommandButton cmdOK 
  42.       Caption         =   "&OK"
  43.       Default         =   -1  'True
  44.       Enabled         =   0   'False
  45.       Height          =   375
  46.       Left            =   2760
  47.       TabIndex        =   2
  48.       Top             =   960
  49.       Width           =   1695
  50.    End
  51.    Begin TextBox txtDatabase 
  52.       Height          =   285
  53.       Left            =   120
  54.       TabIndex        =   1
  55.       Top             =   480
  56.       Width           =   7095
  57.    End
  58.    Begin Label Label1 
  59.       BackColor       =   &H00C0C0C0&
  60.       Caption         =   "Database path and name:"
  61.       Height          =   255
  62.       Left            =   120
  63.       TabIndex        =   0
  64.       Top             =   240
  65.       Width           =   4095
  66.    End
  67. Option Explicit
  68. 'Subroutine: cmdCancel_Click    Author: A.Pasho
  69. '                               Date 8/9/94
  70. 'Description: ends the program
  71. Sub cmdCancel_Click ()
  72.     If bRufDbEnd Then
  73.         End
  74.     Else
  75.         Unload RUFDBForm
  76.     End If
  77. End Sub
  78. 'Subroutine: cmdOK_Click    Author: A.Pasho
  79. '                           Date 8/9/94
  80. 'Description: gets the database path & appends the
  81. 'database file name; closes the form
  82. Sub cmdOk_Click ()
  83.     Dim x%
  84.     sDBPath = txtDatabase.Text
  85.     Unload RUFDBForm
  86. End Sub
  87. Sub cmdSel_Click ()
  88.     CMDialog1.Filename = "*.mdb"
  89.     CMDialog1.Action = 1
  90.     txtDatabase.Text = CMDialog1.Filename
  91. End Sub
  92. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  93.     If KeyCode = KEY_F1 Then
  94.         CallHelp Database_Location_Form
  95.     End If
  96. End Sub
  97. Sub Form_Load ()
  98.     txtDatabase.Text = sDBPath
  99. End Sub
  100. Sub txtDatabase_Change ()
  101.     If Len(txtDatabase.Text) < 1 Then
  102.         cmdOK.Enabled = False
  103.     Else
  104.         cmdOK.Enabled = True
  105.     End If
  106. End Sub
  107. Sub txtDatabase_KeyPress (KeyAscii As Integer)
  108.     KeyAscii = Asc(UCase(Chr(KeyAscii)))
  109. End Sub
  110.